﻿{% for (var i=0, file; file=o.files[i]; i++) { %}
    <tr class="template-upload fade">

       @* <td class="preview"><span class="fade"></span></td>*@
		{% if (file.type==="image/bmp"||file.type==="image/x-icon") { %}
				<td class="preview"><span><i class="img32-doc_img"></i></span></td>
		{% } else if (file.type2==="image") { %}
				<td class="preview"><span class="fade"></span></td>
		{% } else { %}
				<td class="preview">
@*				{%=file.type%}</br>{%=file.type2%}</br>{%=file.extension%}
*@				<span><i class="img32-doc_{%=file.extension%}"></i></span></td>			
		{% } %}
        <td class="name size" >@*style="width:30%;"*@
			<span>{%=file.name%} - {%=o.formatFileSize(file.size)%}</span>
			 {% if (file.paramName==="docs[]") { %}
				<div class="ExtendIt"><input type="text" placeholder="Pasirinkite.." name="category[]" data-ctrl='{"ListType":"List","Source":"tblDocTypes","iVal":"iD","iText":["name"]}'></div>
		  {% } else { %}
				<span>Nuotrauka</span>
		  {% } %}
		
		</td>
        <td style="width:40%;">
			<span>Aprašymas</span>
			<div>
				<textarea rows="1" name="description[]" style="width:100%;"></textarea>
			</div>	
		</td>
	    {% if (file.error) { %}
            <td class="error" colspan="2"><span class="label label-important">Error</span> {%=file.error%}</td>
        {% } else if (o.files.valid && !i) { %}
             <td class="start hidden">{% if (!o.options.autoUpload) { %}
                <button class="btn btn-primary">
                    <i class="icon-upload icon-white"></i>
                    <span>Start</span>
                </button>
            {% } %}</td>

        {% } else { %}
            <td colspan="2"></td>
        {% } %}
        <td class="cancel">{% if (!i) { %}
				<button title="Atšaukti" style="background:none;cursor:pointer;margin-top:8px;">
					 <i class="img32-mono_delete"></i>
					 @*<span></span>*@
				</button>
        {% } %}</td>
    </tr>
{% } %}